package com.isesol.ime.manager;

import com.isesol.ime.dao.*;
import com.isesol.ime.entity.*;
import com.isesol.orm.jpa.*;
import org.springframework.stereotype.*;
import org.springframework.transaction.annotation.*;

import javax.annotation.*;
import java.util.*;

/**
 * 报文管理 Manager
 *
 * @author Wang Jun
 */
@Component
@Transactional
public class MessageManager extends AbstractJpaEntityManager<Message, Long>{

	/**
	 * 报文管理 Dao
	 */
	@Resource
	MessageDao messageDao;

	public List<Message> findByMsgId(String msgId){

		return messageDao.findByMsgId(msgId);
	}

	public List<Message> findByMsgName(String msgName){

		return messageDao.findByMsgName(msgName);
	}
	public List<Message> findByTypeId(long typeId){

		return messageDao.findByTypeId(typeId);
	}


	@Override
	@Resource(type = MessageDao.class)
	protected void setDao(JpaDao dao) {

		super.dao = dao;
	}

}
